<?php
$server="localhost";
$name="root";
$pwd="123456";
$db="alim";

$con=mysqli_connect($server,$name,$pwd,$db);

$name=$_POST['name'];
$kaspi=$_POST['kaspi'];
$jinsi=$_POST['jinsi'];
$max=$_POST['max'];

if ($con){
    $sql="insert into yultuz(name,kaspi,jinsi,max) values ('$name','$kaspi','$jinsi',$max)";
    $run=mysqli_query($con,$sql);
    if($run){
        echo "数据表添加成功";
    }else{
        echo "已连接成功，但未能添加数据:" .mysqli_connect_error($con);
    }
    }else{
    echo "未连接数据库，错误内容：" .mysqli_connect_error();
}